//
//  RecommendViewController.swift
//  Exchange
//
//  Created by 孟祥群 on 2018/8/9.
//  Copyright © 2018年 common. All rights reserved.
//

import UIKit

class RecommendViewController: BaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        self.title = "邀请送奖励"
        
        let imageView = UIImageView(image: UIImage(named: "recommend"))
        self.view.addSubview(imageView)
        imageView.snp.makeConstraints { (make) in
            make.top.bottom.left.right.equalToSuperview()
        }
        
        for i in 0 ..< 2 {
           let shareBtn = UIButton()
            shareBtn.backgroundColor = UIColor(hexStr: "#edf5fd")
            shareBtn.setTitle(i == 0 ? "分享链接" : "分享海报", for: UIControlState.normal)
            shareBtn.layer.cornerRadius = 45/2
            shareBtn.layer.masksToBounds = true
            shareBtn.setTitleColor(UIColor(hexStr: "#2d2cc2"), for: UIControlState.normal)
            shareBtn.titleLabel?.font = UIFont.systemFont(ofSize: 15)
            self.view.addSubview(shareBtn)
            
            shareBtn.snp.makeConstraints { (make) in
                make.left.equalToSuperview().offset(15 + ((kSCREEN_WIDTH-50)/2 + CGFloat(10)) * CGFloat(i))
                make.bottom.equalToSuperview().offset(isiPhoneX() ? -83 : -49 )
                make.width.equalTo((kSCREEN_WIDTH-50)/2)
                make.height.equalTo(45)
            }
            
        }
        
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
